<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:c="http://java.sun.com/jsp/jstl/core"	
	template="/resources/scaffold/pageTemplate.xhtml">

	<f:metadata>
		<f:viewParam name="id" value="#{mmItemGradeBean.id}"/>
		<f:event type="preRenderView" listener="#{mmItemGradeBean.retrieve}"/>
	</f:metadata>

	<ui:param name="pageTitle" value="Create Mm Item Grade"/>

	<ui:define name="header">
		Mm Item Grade
	</ui:define>

	<ui:define name="subheader">
		<c:choose>
			<c:when test="#{!empty mmItemGradeBean.id}">
				Edit existing Mm Item Grade
			</c:when>
			<c:otherwise>
				Create a new Mm Item Grade
			</c:otherwise>
		</c:choose>
	</ui:define>

	<ui:define name="footer"/>

	<ui:define name="main">
		<h:form id="create">
			<h:messages globalOnly="true" styleClass="error"/>

			<h:panelGrid columnClasses="label,component,required" columns="3">
				<h:outputLabel for="mmItemGradeBeanMmItemGradeItemGradeNo" value="Item Grade No:"/>
				<h:panelGroup>
					<h:inputText id="mmItemGradeBeanMmItemGradeItemGradeNo" required="true" value="#{mmItemGradeBean.mmItemGrade.itemGradeNo}"/>
					<h:message for="mmItemGradeBeanMmItemGradeItemGradeNo" styleClass="error"/>
				</h:panelGroup>
				<h:outputText value="*"/>
				<h:outputLabel for="mmItemGradeBeanMmItemGradeItemGradeCode" value="Item Grade Code:"/>
				<h:panelGroup>
					<h:inputText id="mmItemGradeBeanMmItemGradeItemGradeCode" maxLength="50" value="#{mmItemGradeBean.mmItemGrade.itemGradeCode}"/>
					<h:message for="mmItemGradeBeanMmItemGradeItemGradeCode" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="mmItemGradeBeanMmItemGradeItemGradeDescr" value="Item Grade Descr:"/>
				<h:panelGroup>
					<h:inputText id="mmItemGradeBeanMmItemGradeItemGradeDescr" maxLength="300" value="#{mmItemGradeBean.mmItemGrade.itemGradeDescr}"/>
					<h:message for="mmItemGradeBeanMmItemGradeItemGradeDescr" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="mmItemGradeBeanMmItemGradeItemGradeMemo" value="Item Grade Memo:"/>
				<h:panelGroup>
					<h:inputText id="mmItemGradeBeanMmItemGradeItemGradeMemo" maxLength="500" value="#{mmItemGradeBean.mmItemGrade.itemGradeMemo}"/>
					<h:message for="mmItemGradeBeanMmItemGradeItemGradeMemo" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="mmItemGradeBeanMmItemGradeItemGradeEffectiveDate" value="Item Grade Effective Date:"/>
				<h:panelGroup>
					<h:inputText id="mmItemGradeBeanMmItemGradeItemGradeEffectiveDate" maxLength="10" value="#{mmItemGradeBean.mmItemGrade.itemGradeEffectiveDate}">
						<f:convertDateTime type="date"/>
					</h:inputText>
					<h:message for="mmItemGradeBeanMmItemGradeItemGradeEffectiveDate" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="mmItemGradeBeanMmItemGradeItemGradeExpireDate" value="Item Grade Expire Date:"/>
				<h:panelGroup>
					<h:inputText id="mmItemGradeBeanMmItemGradeItemGradeExpireDate" maxLength="10" value="#{mmItemGradeBean.mmItemGrade.itemGradeExpireDate}">
						<f:convertDateTime type="date"/>
					</h:inputText>
					<h:message for="mmItemGradeBeanMmItemGradeItemGradeExpireDate" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="mmItemGradeBeanMmItemGradeItemGradeIsActive" value="Item Grade Is Active:"/>
				<h:panelGroup>
					<h:inputText id="mmItemGradeBeanMmItemGradeItemGradeIsActive" value="#{mmItemGradeBean.mmItemGrade.itemGradeIsActive}"/>
					<h:message for="mmItemGradeBeanMmItemGradeItemGradeIsActive" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
			</h:panelGrid>

			<div class="buttons">
				<h:commandLink value="Save" action="#{mmItemGradeBean.update}" styleClass="btn btn-primary"/>
				<c:choose>
					<c:when test="#{!empty mmItemGradeBean.id}">
						<h:link value="Cancel" outcome="view" styleClass="btn btn-primary">
							<f:param name="id" value="#{mmItemGradeBean.id}"/>
						</h:link>
						<h:commandLink value="Delete" action="#{mmItemGradeBean.delete}" styleClass="btn btn-primary"/>
					</c:when>
					<c:otherwise>
						<h:link value="Cancel" outcome="search" styleClass="btn btn-primary"/>
					</c:otherwise>
				</c:choose>
			</div>
		</h:form>
	</ui:define>

</ui:composition>